package com.wmg.service.impl;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.wmg.common.JsonResult;
import com.wmg.dao.UserMapper;
import com.wmg.entity.User;
import com.wmg.service.TestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TestServiceImpl implements TestService {
    public static Logger log = LoggerFactory.getLogger(TestServiceImpl.class);

    @Autowired
    private UserMapper userDao;

    public JsonResult<User> str() {
        ObjectMapper mapper = new ObjectMapper();
        User user = userDao.selectByPrimaryKey(1);
        return JsonResult.createSuccessWithData(user);
    }
}
